home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
tcplusx.zip
/
GEN.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-02
|
3KB
|
113 lines
#ifndef _GEN_H
#define _GEN_H
//
// gen.h - header file for general purpose structures and classes
// Author - Robin W. McKean
// Last Update - February 17,1991
// Copyright (C) 1991 All rights reserved
//
// This file remains the property of the author, Robin W. McKean. You are
// free to use and change it as you see fit. This module, nor its object
// code, may not however be included in any packaged software without the
// written consent of the author.
//
// Contents ----------------------------------------------------------------
//
// Point
//
// Description
//
// Defines a structure containing row/column coordinates
//
// Sector
//
// Description
//
// Defines a sector of an object, defined as a square of some type
//
// End ---------------------------------------------------------------------
struct Point
{
int row;
int column;
};
struct Sector
{
int topRow;
int topColumn;
int bottomRow;
int bottomCol;
};
struct Pen
{
char fillCharacter; // Character based fill text
unsigned int monoAttribute; // Monochrome attribute
unsigned int colorAttribute; // Color attribute
int fillPattern; // Graphics fill pattern
unsigned int bwColor; // CGA graphics colors
unsigned int enhancedColor; // EGA & VGA graphics colors
unsigned int greyColor; // Black and White VGA-EGA colors
};
// Event types
#define NO_EVENT 0
#define E_KEY 1
#define E_MOUSE 2
#define ALT_KEY_PRESSED 3
// Device states
#define D_ON 0
#define D_OFF 1
#define D_INACTIVE 2
#define D_SHOW 3
#define D_POSITION 4
#define D_HIDE 5
#define D_INIT 6
#define DC_OVERTYPE 7
#define DC_INSERT 8
// Device types
#define D_KEYBOARD 0
#define D_MOUSE 1
#define D_CURSOR 2
// Non keyboard or mouse event type
#define S_DEVICE 10
// These are possible keyboard shift states
#define K_SHIFT 0x3
#define K_CTRL 0x4
#define K_ALT 0x8
#define K_SCROLL 0x10
#define K_NUMLOCK 0x20
#define K_CAPSLOCK 0x40
#define K_INSERTON 0x80
#define M_LEFT_SELECT 0x0010
#define M_MIDDLE_SELECT 0x0011
#define M_RIGHT_SELECT 0x0012
#define M_LCONTINUE_SELECT 0x0013
#define M_RCONTINUE_SELECT 0x0014
#define M_MCONTINUE_SELECT 0x0015
#define M_MIDDLE_RELEASE 0x0016
#define M_LEFT_RELEASE 0x0017
#define M_RIGHT_RELEASE 0x0018
#ifndef MAX
#define MAX( a, b ) ( ( ( a ) >= ( b ) ) ? ( a ) : ( b ) )
#define MIN( a, b ) ( ( ( a ) <= ( b ) ) ? ( a ) : ( b ) )
#endif
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#endif